home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / info / xemacs.info-15 < prev    next >
Encoding:
GNU Info File  |  1995-09-01  |  47.4 KB  |  1,254 lines

  1. This is Info file ../../info/xemacs.info, produced by Makeinfo-1.63
  2. from the input file xemacs.texi.
  3.  
  4.    This file documents the XEmacs editor.
  5.  
  6.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
  7. 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
  8. Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
  9.  
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided also
  16. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  17. General Public License" are included exactly as in the original, and
  18. provided that the entire resulting derived work is distributed under the
  19. terms of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "The GNU Manifesto",
  24. "Distribution" and "GNU General Public License" may be included in a
  25. translation approved by the author instead of in the original English.
  26.  
  27. 
  28. File: xemacs.info,  Node: Programmatic Rebinding,  Next: Key Bindings Using Strings,  Prev: Interactive Rebinding,  Up: Rebinding
  29.  
  30. Changing Key Bindings Programmatically
  31. ......................................
  32.  
  33.    You can use the functions `global-set-key' and `define-key' to
  34. rebind keys under program control.
  35.  
  36. ``(global-set-key KEYS CMD)''
  37.      Defines KEYS globally to run CMD.
  38.  
  39. ``(define-key KEYMAP KEYS DEF)''
  40.      Defines KEYS to run DEF in the keymap KEYMAP.
  41.  
  42.    KEYMAP is a keymap object.
  43.  
  44.    KEYS is the sequence of keystrokes to bind.
  45.  
  46.    DEF is anything that can be a key's definition:
  47.  
  48.    * `nil', meaning key is undefined in this keymap
  49.  
  50.    * A command, that is, a Lisp function suitable for interactive
  51.      calling
  52.  
  53.    * A string or key sequence vector, which is treated as a keyboard
  54.      macro
  55.  
  56.    * A keymap to define a prefix key
  57.  
  58.    * A symbol so that when the key is looked up, the symbol stands for
  59.      its function definition, which should at that time be one of the
  60.      above, or another symbol whose function definition is used, and so
  61.      on
  62.  
  63.    * A cons, `(string . defn)', meaning that DEFN is the definition
  64.      (DEFN should be a valid definition in its own right)
  65.  
  66.    * A cons, `(keymap . char)', meaning use the definition of CHAR in
  67.      map KEYMAP
  68.  
  69.    For backward compatibility, XEmacs allows you to specify key
  70. sequences as strings.  However, the preferred method is to use the
  71. representations of key sequences as vectors of keystrokes.  *Note
  72. Keystrokes::, for more information about the rules for constructing key
  73. sequences.
  74.  
  75.    Emacs allows you to abbreviate representations for key sequences in
  76. most places where there is no ambiguity.  Here are some rules for
  77. abbreviation:
  78.  
  79.    * The keysym by itself is equivalent to a list of just that keysym,
  80.      i.e., `f1' is equivalent to `(f1)'.
  81.  
  82.    * A keystroke by itself is equivalent to a vector containing just
  83.      that keystroke, i.e.,  `(control a)' is equivalent to `[(control
  84.      a)]'.
  85.  
  86.    * You can use ASCII codes for keysyms that have them. i.e., `65' is
  87.      equivalent to `A'. (This is not so much an abbreviation as an
  88.      alternate representation.)
  89.  
  90.    Here are some examples of programmatically binding keys:
  91.  
  92.  
  93.      ;;;  Bind `my-command' to f1
  94.      (global-set-key 'f1 'my-command)
  95.      
  96.      ;;;  Bind `my-command' to `Shift-f1'
  97.      (global-set-key '(shift f1) 'my-command)
  98.      
  99.      ;;; Bind `my-command' to `C-c Shift-f1'
  100.      (global-set-key '[(control c) (shift f1)] 'my-command)
  101.      
  102.      ;;; Bind `my-command' to the middle mouse button.
  103.      (global-set-key 'button2 'my-command)
  104.      
  105.      ;;; Bind `my-command' to `META CTL Right Mouse Button'
  106.      ;;; in the keymap that is in force when you are running `dired'.
  107.      (define-key dired-mode-map '(meta control button3) 'my-command)
  108.  
  109. 
  110. File: xemacs.info,  Node: Key Bindings Using Strings,  Prev: Programmatic Rebinding,  Up: Rebinding
  111.  
  112. Using Strings for Changing Key Bindings
  113. .......................................
  114.  
  115.    For backward compatibility, you can still use strings to represent
  116. key sequences.  Thus you can use comands like the following:
  117.  
  118.      ;;; Bind `end-of-line' to `C-f'
  119.      (global-set-key "\C-f" 'end-of-line)
  120.  
  121.    Note, however, that in some cases you may be binding more than one
  122. key sequence by using a single command.  This situation can arise
  123. because in ASCII, `C-i' and TAB have the same representation.
  124. Therefore, when Emacs sees:
  125.  
  126.      (global-set-key "\C-i" 'end-of-line)
  127.  
  128.    it is unclear whether the user intended to bind `C-i' or TAB.  The
  129. solution XEmacs adopts is to bind both of these key sequences.
  130.  
  131.    After binding a command to two key sequences with a form like:
  132.  
  133.          (define-key global-map "\^X\^I" 'command-1)
  134.  
  135.    it is possible to redefine only one of those sequences like so:
  136.  
  137.          (define-key global-map [(control x) (control i)] 'command-2)
  138.          (define-key global-map [(control x) tab] 'command-3)
  139.  
  140.    This applies only when running under a window system.  If you are
  141. talking to Emacs through an ASCII-only channel, you do not get any of
  142. these features.
  143.  
  144.    Here is a table of pairs of key sequences that behave in a similar
  145. fashion:
  146.  
  147.              control h      backspace
  148.              control l      clear
  149.              control i      tab
  150.              control m      return
  151.              control j      linefeed
  152.              control [      escape
  153.              control @      control space
  154.  
  155. 
  156. File: xemacs.info,  Node: Disabling,  Prev: Rebinding,  Up: Key Bindings
  157.  
  158. Disabling Commands
  159. ------------------
  160.  
  161.    Disabling a command marks it as requiring confirmation before it can
  162. be executed.  The purpose of disabling a command is to prevent
  163. beginning users from executing it by accident and being confused.
  164.  
  165.    The direct mechanism for disabling a command is to have a non-`nil'
  166. `disabled' property on the Lisp symbol for the command.  These
  167. properties are normally set by the user's `.emacs' file with Lisp
  168. expressions such as:
  169.  
  170.      (put 'delete-region 'disabled t)
  171.  
  172.    If the value of the `disabled' property is a string, that string is
  173. included in the message printed when the command is used:
  174.  
  175.      (put 'delete-region 'disabled
  176.           "Text deleted this way cannot be yanked back!\n")
  177.  
  178.    You can disable a command either by editing the `.emacs' file
  179. directly or with the command `M-x disable-command', which edits the
  180. `.emacs' file for you.  *Note Init File::.
  181.  
  182.    When you attempt to invoke a disabled command interactively in Emacs,
  183. a window is displayed containing the command's name, its documentation,
  184. and some instructions on what to do next; then Emacs asks for input
  185. saying whether to execute the command as requested, enable it and
  186. execute, or cancel it.  If you decide to enable the command, you are
  187. asked whether to do this permanently or just for the current session.
  188. Enabling permanently works by automatically editing your `.emacs' file.
  189. You can use `M-x enable-command' at any time to enable any command
  190. permanently.
  191.  
  192.    Whether a command is disabled is independent of what key is used to
  193. invoke it; it also applies if the command is invoked using `M-x'.
  194. Disabling a command has no effect on calling it as a function from Lisp
  195. programs.
  196.  
  197. 
  198. File: xemacs.info,  Node: Syntax,  Next: Init File,  Prev: Key Bindings,  Up: Customization
  199.  
  200. The Syntax Table
  201. ================
  202.  
  203.    All the Emacs commands which parse words or balance parentheses are
  204. controlled by the "syntax table".  The syntax table specifies which
  205. characters are opening delimiters, which are parts of words, which are
  206. string quotes, and so on.  Actually, each major mode has its own syntax
  207. table (though sometimes related major modes use the same one) which it
  208. installs in each buffer that uses that major mode.  The syntax table
  209. installed in the current buffer is the one that all commands use, so we
  210. call it "the" syntax table.  A syntax table is a Lisp object, a vector
  211. of length 256 whose elements are numbers.
  212.  
  213. * Menu:
  214.  
  215. * Entry: Syntax Entry.    What the syntax table records for each character.
  216. * Change: Syntax Change.  How to change the information.
  217.  
  218. 
  219. File: xemacs.info,  Node: Syntax Entry,  Next: Syntax Change,  Up: Syntax
  220.  
  221. Information About Each Character
  222. --------------------------------
  223.  
  224.    The syntax table entry for a character is a number that encodes six
  225. pieces of information:
  226.  
  227.    * The syntactic class of the character, represented as a small
  228.      integer
  229.  
  230.    * The matching delimiter, for delimiter characters only (the
  231.      matching delimiter of `(' is `)', and vice versa)
  232.  
  233.    * A flag saying whether the character is the first character of a
  234.      two-character comment starting sequence
  235.  
  236.    * A flag saying whether the character is the second character of a
  237.      two-character comment starting sequence
  238.  
  239.    * A flag saying whether the character is the first character of a
  240.      two-character comment ending sequence
  241.  
  242.    * A flag saying whether the character is the second character of a
  243.      two-character comment ending sequence
  244.  
  245.    The syntactic classes are stored internally as small integers, but
  246. are usually described to or by the user with characters.  For example,
  247. `(' is used to specify the syntactic class of opening delimiters.  Here
  248. is a table of syntactic classes, with the characters that specify them.
  249.  
  250. ` '
  251.      The class of whitespace characters.
  252.  
  253. `w'
  254.      The class of word-constituent characters.
  255.  
  256. `_'
  257.      The class of characters that are part of symbol names but not
  258.      words.  This class is represented by `_' because the character `_'
  259.      has this class in both C and Lisp.
  260.  
  261. `.'
  262.      The class of punctuation characters that do not fit into any other
  263.      special class.
  264.  
  265. `('
  266.      The class of opening delimiters.
  267.  
  268. `)'
  269.      The class of closing delimiters.
  270.  
  271. `''
  272.      The class of expression-adhering characters.  These characters are
  273.      part of a symbol if found within or adjacent to one, and are part
  274.      of a following expression if immediately preceding one, but are
  275.      like whitespace if surrounded by whitespace.
  276.  
  277. `"'
  278.      The class of string-quote characters.  They match each other in
  279.      pairs, and the characters within the pair all lose their syntactic
  280.      significance except for the `\' and `/' classes of escape
  281.      characters, which can be used to include a string-quote inside the
  282.      string.
  283.  
  284. `$'
  285.      The class of self-matching delimiters.  This is intended for TeX's
  286.      `$', which is used both to enter and leave math mode.  Thus, a
  287.      pair of matching `$' characters surround each piece of math mode
  288.      TeX input.  A pair of adjacent `$' characters act like a single
  289.      one for purposes of matching.
  290.  
  291. `/'
  292.      The class of escape characters that always just deny the following
  293.      character its special syntactic significance.  The character after
  294.      one of these escapes is always treated as alphabetic.
  295.  
  296. `\'
  297.      The class of C-style escape characters.  In practice, these are
  298.      treated just like `/'-class characters, because the extra
  299.      possibilities for C escapes (such as being followed by digits)
  300.      have no effect on where the containing expression ends.
  301.  
  302. `<'
  303.      The class of comment-starting characters.  Only single-character
  304.      comment starters (such as `;' in Lisp mode) are represented this
  305.      way.
  306.  
  307. `>'
  308.      The class of comment-ending characters.  Newline has this syntax in
  309.      Lisp mode.
  310.  
  311.    The characters flagged as part of two-character comment delimiters
  312. can have other syntactic functions most of the time.  For example, `/'
  313. and `*' in C code, when found separately, have nothing to do with
  314. comments.  The comment-delimiter significance overrides when the pair of
  315. characters occur together in the proper order.  Only the list and sexp
  316. commands use the syntax table to find comments; the commands
  317. specifically for comments have other variables that tell them where to
  318. find comments.  Moreover, the list and sexp commands notice comments
  319. only if `parse-sexp-ignore-comments' is non-`nil'.  This variable is set
  320. to `nil' in modes where comment-terminator sequences are liable to
  321. appear where there is no comment, for example, in Lisp mode where the
  322. comment terminator is a newline but not every newline ends a comment.
  323.  
  324. 
  325. File: xemacs.info,  Node: Syntax Change,  Prev: Syntax Entry,  Up: Syntax
  326.  
  327. Altering Syntax Information
  328. ---------------------------
  329.  
  330.    It is possible to alter a character's syntax table entry by storing
  331. a new number in the appropriate element of the syntax table, but it
  332. would be hard to determine what number to use.  Emacs therefore
  333. provides a command that allows you to specify the syntactic properties
  334. of a character in a convenient way.
  335.  
  336.    `M-x modify-syntax-entry' is the command to change a character's
  337. syntax.  It can be used interactively and is also used by major modes
  338. to initialize their own syntax tables.  Its first argument is the
  339. character to change.  The second argument is a string that specifies the
  340. new syntax.  When called from Lisp code, there is a third, optional
  341. argument, which specifies the syntax table in which to make the change.
  342. If not supplied, or if this command is called interactively, the third
  343. argument defaults to the current buffer's syntax table.
  344.  
  345.   1. The first character in the string specifies the syntactic class.
  346.      It is one of the characters in the previous table (*note Syntax
  347.      Entry::.).
  348.  
  349.   2. The second character is the matching delimiter.  For a character
  350.      that is not an opening or closing delimiter, this should be a
  351.      space, and may be omitted if no following characters are needed.
  352.  
  353.   3. The remaining characters are flags.  The flag characters allowed
  354.      are:
  355.  
  356.     `1'
  357.           Flag this character as the first of a two-character comment
  358.           starting sequence.
  359.  
  360.     `2'
  361.           Flag this character as the second of a two-character comment
  362.           starting sequence.
  363.  
  364.     `3'
  365.           Flag this character as the first of a two-character comment
  366.           ending sequence.
  367.  
  368.     `4'
  369.           Flag this character as the second of a two-character comment
  370.           ending sequence.
  371.  
  372.    Use `C-h s' (`describe-syntax') to display a description of the
  373. contents of the current syntax table.  The description of each
  374. character includes both the string you have to pass to
  375. `modify-syntax-entry' to set up that character's current syntax, and
  376. some English to explain that string if necessary.
  377.  
  378. 
  379. File: xemacs.info,  Node: Init File,  Next: Audible Bell,  Prev: Syntax,  Up: Customization
  380.  
  381. The Init File, .emacs
  382. =====================
  383.  
  384.    When you start Emacs, it normally loads the file `.emacs' in your
  385. home directory.  This file, if it exists, should contain Lisp code.  It
  386. is called your initialization file or "init file".  Use the command
  387. line switches `-q' and `-u' to tell Emacs whether to load an init file
  388. (*note Entering Emacs::.).
  389.  
  390.    When the `.emacs' file is read, the variable `init-file-user' says
  391. which user's init file it is.  The value may be the null string or a
  392. string containing a user's name.  If the value is a null string, it
  393. means that the init file was taken from the user that originally logged
  394. in.
  395.  
  396.    In all cases, `(concat "~" init-file-user "/")' evaluates to the
  397. directory name of the directory where the `.emacs' file was looked for.
  398.  
  399.    At some sites there is a "default init file", which is the library
  400. named `default.el', found via the standard search path for libraries.
  401. The Emacs distribution contains no such library; your site may create
  402. one for local customizations.  If this library exists, it is loaded
  403. whenever you start Emacs.  But your init file, if any, is loaded first;
  404. if it sets `inhibit-default-init' non-`nil', then `default' is not
  405. loaded.
  406.  
  407.    If you have a large amount of code in your `.emacs' file, you should
  408. move it into another file named `SOMETHING.el', byte-compile it (*note
  409. Lisp Libraries::.), and load that file from your `.emacs' file using
  410. `load'.
  411.  
  412. * Menu:
  413.  
  414. * Init Syntax::     Syntax of constants in Emacs Lisp.
  415. * Init Examples::   How to do some things with an init file.
  416. * Terminal Init::   Each terminal type can have an init file.
  417.  
  418. 
  419. File: xemacs.info,  Node: Init Syntax,  Next: Init Examples,  Up: Init File
  420.  
  421. Init File Syntax
  422. ----------------
  423.  
  424.    The `.emacs' file contains one or more Lisp function call
  425. expressions.  Each consists of a function name followed by arguments,
  426. all surrounded by parentheses.  For example, `(setq fill-column 60)'
  427. represents a call to the function `setq' which is used to set the
  428. variable `fill-column' (*note Filling::.) to 60.
  429.  
  430.    The second argument to `setq' is an expression for the new value of
  431. the variable.  This can be a constant, a variable, or a function call
  432. expression.  In `.emacs', constants are used most of the time.  They
  433. can be:
  434.  
  435. Numbers
  436.      Integers are written in decimal, with an optional initial minus
  437.      sign.
  438.  
  439.      If a sequence of digits is followed by a period and another
  440.      sequence of digits, it is interpreted as a floating point number.
  441.  
  442. Strings
  443.      Lisp string syntax is the same as C string syntax with a few extra
  444.      features.  Use a double-quote character to begin and end a string
  445.      constant.
  446.  
  447.      Newlines and special characters may be present literally in
  448.      strings.  They can also be represented as backslash sequences:
  449.      `\n' for newline, `\b' for backspace, `\r' for return, `\t' for
  450.      tab, `\f' for formfeed (control-l), `\e' for escape, `\\' for a
  451.      backslash, `\"' for a double-quote, or `\OOO' for the character
  452.      whose octal code is OOO.  Backslash and double-quote are the only
  453.      characters for which backslash sequences are mandatory.
  454.  
  455.      You can use `\C-' as a prefix for a control character, as in
  456.      `\C-s' for ASCII Control-S, and `\M-' as a prefix for a Meta
  457.      character, as in `\M-a' for Meta-A or `\M-\C-a' for Control-Meta-A.
  458.  
  459. Characters
  460.      Lisp character constant syntax consists of a `?' followed by
  461.      either a character or an escape sequence starting with `\'.
  462.      Examples: `?x', `?\n', `?\"', `?\)'.  Note that strings and
  463.      characters are not interchangeable in Lisp; some contexts require
  464.      one and some contexts require the other.
  465.  
  466. True
  467.      `t' stands for `true'.
  468.  
  469. False
  470.      `nil' stands for `false'.
  471.  
  472. Other Lisp objects
  473.      Write a single-quote (') followed by the Lisp object you want.
  474.  
  475. 
  476. File: xemacs.info,  Node: Init Examples,  Next: Terminal Init,  Prev: Init Syntax,  Up: Init File
  477.  
  478. Init File Examples
  479. ------------------
  480.  
  481.    Here are some examples of doing certain commonly desired things with
  482. Lisp expressions:
  483.  
  484.    * Make TAB in C mode just insert a tab if point is in the middle of a
  485.      line.
  486.  
  487.           (setq c-tab-always-indent nil)
  488.  
  489.      Here we have a variable whose value is normally `t' for `true' and
  490.      the alternative is `nil' for `false'.
  491.  
  492.    * Make searches case sensitive by default (in all buffers that do not
  493.      override this).
  494.  
  495.           (setq-default case-fold-search nil)
  496.  
  497.      This sets the default value, which is effective in all buffers
  498.      that do not have local values for the variable.  Setting
  499.      `case-fold-search' with `setq' affects only the current buffer's
  500.      local value, which is probably not what you want to do in an init
  501.      file.
  502.  
  503.    * Make Text mode the default mode for new buffers.
  504.  
  505.           (setq default-major-mode 'text-mode)
  506.  
  507.      Note that `text-mode' is used because it is the command for
  508.      entering the mode we want.  A single-quote is written before it to
  509.      make a symbol constant; otherwise, `text-mode' would be treated as
  510.      a variable name.
  511.  
  512.    * Turn on Auto Fill mode automatically in Text mode and related
  513.      modes.
  514.  
  515.           (setq text-mode-hook
  516.             '(lambda () (auto-fill-mode 1)))
  517.  
  518.      Here we have a variable whose value should be a Lisp function.  The
  519.      function we supply is a list starting with `lambda', and a single
  520.      quote is written in front of it to make it (for the purpose of this
  521.      `setq') a list constant rather than an expression.  Lisp functions
  522.      are not explained here; for mode hooks it is enough to know that
  523.      `(auto-fill-mode 1)' is an expression that will be executed when
  524.      Text mode is entered.  You could replace it with any other
  525.      expression that you like, or with several expressions in a row.
  526.  
  527.           (setq text-mode-hook 'turn-on-auto-fill)
  528.  
  529.      This is another way to accomplish the same result.
  530.      `turn-on-auto-fill' is a symbol whose function definition is
  531.      `(lambda () (auto-fill-mode 1))'.
  532.  
  533.    * Load the installed Lisp library named `foo' (actually a file
  534.      `foo.elc' or `foo.el' in a standard Emacs directory).
  535.  
  536.           (load "foo")
  537.  
  538.      When the argument to `load' is a relative pathname, not starting
  539.      with `/' or `~', `load' searches the directories in `load-path'
  540.      (*note Loading::.).
  541.  
  542.    * Load the compiled Lisp file `foo.elc' from your home directory.
  543.  
  544.           (load "~/foo.elc")
  545.  
  546.      Here an absolute file name is used, so no searching is done.
  547.  
  548.    * Rebind the key `C-x l' to run the function `make-symbolic-link'.
  549.  
  550.           (global-set-key "\C-xl" 'make-symbolic-link)
  551.  
  552.      or
  553.  
  554.           (define-key global-map "\C-xl" 'make-symbolic-link)
  555.  
  556.      Note once again the single-quote used to refer to the symbol
  557.      `make-symbolic-link' instead of its value as a variable.
  558.  
  559.    * Do the same thing for C mode only.
  560.  
  561.           (define-key c-mode-map "\C-xl" 'make-symbolic-link)
  562.  
  563.    * Bind the function key F1 to a command in C mode.  Note that the
  564.      names of function keys must be lower case.
  565.  
  566.           (define-key c-mode-map 'f1 'make-symbolic-link)
  567.  
  568.    * Bind the shifted version of F1 to a command.
  569.  
  570.           (define-key c-mode-map '(shift f1) 'make-symbolic-link)
  571.  
  572.    * Redefine all keys which now run `next-line' in Fundamental mode to
  573.      run `forward-line' instead.
  574.  
  575.           (substitute-key-definition 'next-line 'forward-line
  576.                                      global-map)
  577.  
  578.    * Make `C-x C-v' undefined.
  579.  
  580.           (global-unset-key "\C-x\C-v")
  581.  
  582.      One reason to undefine a key is so that you can make it a prefix.
  583.      Simply defining `C-x C-v ANYTHING' would make `C-x C-v' a prefix,
  584.      but `C-x C-v' must be freed of any non-prefix definition first.
  585.  
  586.    * Make `$' have the syntax of punctuation in Text mode.  Note the
  587.      use of a character constant for `$'.
  588.  
  589.           (modify-syntax-entry ?\$ "." text-mode-syntax-table)
  590.  
  591.    * Enable the use of the command `eval-expression' without
  592.      confirmation.
  593.  
  594.           (put 'eval-expression 'disabled nil)
  595.  
  596. 
  597. File: xemacs.info,  Node: Terminal Init,  Prev: Init Examples,  Up: Init File
  598.  
  599. Terminal-Specific Initialization
  600. --------------------------------
  601.  
  602.    Each terminal type can have a Lisp library to be loaded into Emacs
  603. when it is run on that type of terminal.  For a terminal type named
  604. TERMTYPE, the library is called `term/TERMTYPE' and it is found by
  605. searching the directories `load-path' as usual and trying the suffixes
  606. `.elc' and `.el'.  Normally it appears in the subdirectory `term' of
  607. the directory where most Emacs libraries are kept.
  608.  
  609.    The usual purpose of the terminal-specific library is to define the
  610. escape sequences used by the terminal's function keys using the library
  611. `keypad.el'.  See the file `term/vt100.el' for an example of how this
  612. is done.
  613.  
  614.    When the terminal type contains a hyphen, only the part of the name
  615. before the first hyphen is significant in choosing the library name.
  616. Thus, terminal types `aaa-48' and `aaa-30-rv' both use the library
  617. `term/aaa'.  The code in the library can use `(getenv "TERM")' to find
  618. the full terminal type name.
  619.  
  620.    The library's name is constructed by concatenating the value of the
  621. variable `term-file-prefix' and the terminal type.  Your `.emacs' file
  622. can prevent the loading of the terminal-specific library by setting
  623. `term-file-prefix' to `nil'.
  624.  
  625.    The value of the variable `term-setup-hook', if not `nil', is called
  626. as a function of no arguments at the end of Emacs initialization, after
  627. both your `.emacs' file and any terminal-specific library have been
  628. read.  You can set the value in the `.emacs' file to override part of
  629. any of the terminal-specific libraries and to define initializations
  630. for terminals that do not have a library.
  631.  
  632. 
  633. File: xemacs.info,  Node: Audible Bell,  Next: Faces,  Prev: Init File,  Up: Customization
  634.  
  635. Changing the Bell Sound
  636. =======================
  637.  
  638.    You can now change how the audible bell sounds using the variable
  639. `sound-alist'.
  640.  
  641.    `sound-alist''s value is an list associating symbols with, among
  642. other things, strings of audio-data.  When `ding' is called with one of
  643. the symbols, the associated sound data is played instead of the
  644. standard beep.  This only works if you are logged in on the console of a
  645. machine with audio hardware. To listen to a sound of the provided type,
  646. call the function `play-sound' with the argument SOUND. You can also
  647. set the volume of the sound with the optional argument VOLUME.
  648.  
  649.    Each element of `sound-alist' is a list describing a sound.  The
  650. first element of the list is the name of the sound being defined.
  651. Subsequent elements of the list are alternating keyword/value pairs:
  652.  
  653. `sound'
  654.      A string of raw sound data, or the name of another sound to play.
  655.      The symbol `t' here means use the default X beep.
  656.  
  657. `volume'
  658.      An integer from 0-100, defaulting to `bell-volume'.
  659.  
  660. `pitch'
  661.      If using the default X beep, the pitch (Hz) to generate.
  662.  
  663. `duration'
  664.      If using the default X beep, the duration (milliseconds).
  665.  
  666.    For compatibility, elements of `sound-alist' may also be of the form:
  667.  
  668.      ( SOUND-NAME . <SOUND> )
  669.      ( SOUND-NAME <VOLUME> <SOUND> )
  670.  
  671.    You should probably add things to this list by calling the function
  672. `load-sound-file'.
  673.  
  674.    Note that you can only play audio data if running on the console
  675. screen of a machine with audio hardware which emacs understands, which
  676. at this time means a Sun SparcStation, SGI, or HP9000s700.
  677.  
  678.    Also note that the pitch, duration, and volume options are available
  679. everywhere, but most X servers ignore the `pitch' option.
  680.  
  681.    The variable `bell-volume' should be an integer from 0 to 100, with
  682. 100 being loudest, which controls how loud the sounds emacs makes
  683. should be.  Elements of the `sound-alist' may override this value.
  684. This variable applies to the standard X bell sound as well as sound
  685. files.
  686.  
  687.    If the symbol `t' is in place of a sound-string, Emacs uses the
  688. default X beep.  This allows you to define beep-types of different
  689. volumes even when not running on the console.
  690.  
  691.    You can add things to this list by calling the function
  692. `load-sound-file', which reads in an audio-file and adds its data to
  693. the sound-alist. You can specify the sound with the SOUND-NAME argument
  694. and the file into which the sounds are loaded with the FILENAME
  695. argument. The optional VOLUME argument sets the volume.
  696.  
  697.    `load-sound-file (FILENAME SOUND-NAME &optional VOLUME)'
  698.  
  699.    To load and install some sound files as beep-types, use the function
  700. `load-default-sounds' (note that this only works if you are on display
  701. 0 of a machine with audio hardware).
  702.  
  703.    The following beep-types are used by Emacs itself. Other Lisp
  704. packages may use other beep types, but these are the ones that the C
  705. kernel of Emacs uses.
  706.  
  707. `auto-save-error'
  708.      An auto-save does not succeed
  709.  
  710. `command-error'
  711.      The Emacs command loop catches an error
  712.  
  713. `undefined-key'
  714.      You type a key that is undefined
  715.  
  716. `undefined-click'
  717.      You use an undefined mouse-click combination
  718.  
  719. `no-completion'
  720.      Completion was not possible
  721.  
  722. `y-or-n-p'
  723.      You type something other than the required `y' or `n'
  724.  
  725. `yes-or-no-p'
  726.      You type something other than `yes' or `no'
  727.  
  728. 
  729. File: xemacs.info,  Node: Faces,  Next: X Resources,  Prev: Audible Bell,  Up: Customization
  730.  
  731. Faces
  732. =====
  733.  
  734.    XEmacs has objects called extents and faces.  An "extent" is a
  735. region of text and a "face" is a collection of textual attributes, such
  736. as fonts and colors.  Every extent is displayed in some face;
  737. therefore, changing the properties of a face immediately updates the
  738. display of all associated extents.  Faces can be frame-local: you can
  739. have a region of text that displays with completely different
  740. attributes when its buffer is viewed from a different X window.
  741.  
  742.    The display attributes of faces may be specified either in Lisp or
  743. through the X resource manager.
  744.  
  745. Customizing Faces
  746. -----------------
  747.  
  748.    You can change the face of an extent with the functions in this
  749. section.  All the functions prompt for a FACE as an argument; use
  750. completion for a list of possible values.
  751.  
  752. `M-x invert-face'
  753.      Swap the foreground and background colors of the given FACE.
  754.  
  755. `M-x make-face-bold'
  756.      Make the font of the given FACE bold.  When called from a program,
  757.      returns `nil' if this is not possible.
  758.  
  759. `M-x make-face-bold-italic'
  760.      Make the font of the given FACE bold italic.  When called from a
  761.      program, returns `nil' if not possible.
  762.  
  763. `M-x make-face-italic'
  764.      Make the font of the given FACE italic.  When called from a
  765.      program, returns `nil' if not possible.
  766.  
  767. `M-x make-face-unbold'
  768.      Make the font of the given FACE non-bold.  When called from a
  769.      program, returns `nil' if not possible.
  770.  
  771. `M-x make-face-unitalic'
  772.      Make the font of the given FACE non-italic.  When called from a
  773.      program, returns `nil' if not possible.
  774.  
  775. `M-x make-face-larger'
  776.      Make the font of the given FACE a little larger.  When called from
  777.      a program, returns `nil' if not possible.
  778.  
  779. `M-x make-face-smaller'
  780.      Make the font of the given FACE a little smaller.  When called
  781.      from a program, returns `nil' if not possible.
  782.  
  783. `M-x set-face-background'
  784.      Change the background color of the given FACE.
  785.  
  786. `M-x set-face-background-pixmap'
  787.      Change the background pixmap of the given FACE.
  788.  
  789. `M-x set-face-font'
  790.      Change the font of the given FACE.
  791.  
  792. `M-x set-face-foreground'
  793.      Change the foreground color of the given FACE.
  794.  
  795. `M-x set-face-underline-p'
  796.      Change whether the given FACE is underlined.
  797.  
  798.    You can exchange the foreground and background color of the selected
  799. FACE with the function `invert-face'. If the face does not specify both
  800. foreground and background, then its foreground and background are set
  801. to the background and foreground of the default face.  When calling
  802. this from a program, you can supply the optional argument FRAME to
  803. specify which frame is affected; otherwise, all frames are affected.
  804.  
  805.    You can set the background color of the specified FACE with the
  806. function `set-face-background'.  The argument `color' should be a
  807. string, the name of a color.  When called from a program, if the
  808. optional FRAME argument is provided, the face is changed only in that
  809. frame; otherwise, it is changed in all frames.
  810.  
  811.    You can set the background pixmap of the specified FACE with the
  812. function `set-face-background-pixmap'.  The pixmap argument NAME should
  813. be a string, the name of a file of pixmap data.  The directories listed
  814. in the `x-bitmap-file-path' variable are searched.  The bitmap may also
  815. be a list of the form `(WIDTH HEIGHT DATA)', where WIDTH and HEIGHT are
  816. the size in pixels, and DATA is a string containing the raw bits of the
  817. bitmap.  If the optional FRAME argument is provided, the face is
  818. changed only in that frame; otherwise, it is changed in all frames.
  819.  
  820.    The variable `x-bitmap-file-path' takes as a value a list of the
  821. directories in which X bitmap files may be found.  If the value is
  822. `nil', the list is initialized from the `*bitmapFilePath' resource.
  823.  
  824.    If the environment variable XBMLANGPATH is set, then it is consulted
  825. before the `x-bitmap-file-path' variable.
  826.  
  827.    You can set the font of the specified FACE with the function
  828. `set-face-font'.  The FONT argument should be a string, the name of a
  829. font.  When called from a program, if the optional FRAME argument is
  830. provided, the face is changed only in that frame; otherwise, it is
  831. changed in all frames.
  832.  
  833.    You can set the foreground color of the specified FACE with the
  834. function `set-face-foreground'.  The argument COLOR should be a string,
  835. the name of a color.  If the optional FRAME argument is provided, the
  836. face is changed only in that frame; otherwise, it is changed in all
  837. frames.
  838.  
  839.    You can set underline the specified FACE with the function
  840. `set-face-underline-p'. The argument UNDERLINE-P can be used to make
  841. underlining an attribute of the face or not. If the optional FRAME
  842. argument is provided, the face is changed only in that frame;
  843. otherwise, it is changed in all frames.
  844.  
  845. 
  846. File: xemacs.info,  Node: X Resources,  Prev: Faces,  Up: Customization
  847.  
  848. X Resources
  849. ===========
  850.  
  851.    The Emacs resources are generally set per-frame. Each Emacs frame
  852. can have its own name or the same name as another, depending on the
  853. name passed to the `make-frame' function.
  854.  
  855.    You can specify resources for all frames with the syntax:
  856.  
  857.      Emacs*parameter: value
  858.  
  859. or
  860.  
  861.      Emacs*EmacsFrame.parameter:value
  862.  
  863. You can specify resources for a particular frame with the syntax:
  864.  
  865.      Emacs*FRAME-NAME.parameter: value
  866.  
  867. * Menu:
  868.  
  869. * Geometry Resources::     Controlling the size and position of frames.
  870. * Iconic Resources::       Controlling whether frames come up iconic.
  871. * Resource List::       List of resources settable on a frame or device.
  872. * Face Resources::       Controlling faces using resources.
  873. * Widgets::           The widget hierarchy for XEmacs.
  874. * Menubar Resources::       Specifying resources for the menubar.
  875.  
  876. 
  877. File: xemacs.info,  Node: Geometry Resources,  Next: Iconic Resources,  Up: X Resources
  878.  
  879. Geometry Resources
  880. ------------------
  881.  
  882.    To make the default size of all Emacs frames be 80 columns by 55
  883. lines, do this:
  884.  
  885.      Emacs*EmacsFrame.geometry: 80x55
  886.  
  887. To set the geometry of a particular frame named `fred', do this:
  888.  
  889.      Emacs*fred.geometry: 80x55
  890.  
  891. Important! Do not use the following syntax:
  892.  
  893.      Emacs*geometry: 80x55
  894.  
  895. You should never use `*geometry' with any X application. It does not
  896. say "make the geometry of Emacs be 80 columns by 55 lines."  It really
  897. says, "make Emacs and all subwindows thereof be 80x55 in whatever units
  898. they care to measure in."  In particular, that is both telling the
  899. Emacs text pane to be 80x55 in characters, and telling the menubar pane
  900. to be 80x55 pixels, which is surely not what you want.
  901.  
  902.    As a special case, this geometry specification also works (and sets
  903. the default size of all Emacs frames to 80 columns by 55 lines):
  904.  
  905.      Emacs.geometry: 80x55
  906.  
  907. since that is the syntax used with most other applications (since most
  908. other applications have only one top-level window, unlike Emacs).  In
  909. general, however, the top-level shell (the unmapped ApplicationShell
  910. widget named `Emacs' that is the parent of the shell widgets that
  911. actually manage the individual frames) does not have any interesting
  912. resources on it, and you should set the resources on the frames instead.
  913.  
  914.    The `-geometry' command-line argument sets only the geometry of the
  915. initial frame created by Emacs.
  916.  
  917.    A more complete explanation of geometry-handling is
  918.  
  919.    * The `-geometry' command-line option sets the `Emacs.geometry'
  920.      resource, that is, the geometry of the ApplicationShell.
  921.  
  922.    * For the first frame created, the size of the frame is taken from
  923.      the ApplicationShell if it is specified, otherwise from the
  924.      geometry of the frame.
  925.  
  926.    * For subsequent frames, the order is reversed: First the frame, and
  927.      then the ApplicationShell.
  928.  
  929.    * For the first frame created, the position of the frame is taken
  930.      from the ApplicationShell (`Emacs.geometry') if it is specified,
  931.      otherwise from the geometry of the frame.
  932.  
  933.    * For subsequent frames, the position is taken only from the frame,
  934.      and never from the ApplicationShell.
  935.  
  936.    This is rather complicated, but it does seem to provide the most
  937. intuitive behavior with respect to the default sizes and positions of
  938. frames created in various ways.
  939.  
  940. 
  941. File: xemacs.info,  Node: Iconic Resources,  Next: Resource List,  Prev: Geometry Resources,  Up: X Resources
  942.  
  943. Iconic Resources
  944. ----------------
  945.  
  946.    Analogous to `-geometry', the `-iconic' command-line option sets the
  947. iconic flag of the ApplicationShell (`Emacs.iconic') and always applies
  948. to the first frame created regardless of its name.  However, it is
  949. possible to set the iconic flag on particular frames (by name) by using
  950. the `Emacs*FRAME-NAME.iconic' resource.
  951.  
  952. 
  953. File: xemacs.info,  Node: Resource List,  Next: Face Resources,  Prev: Iconic Resources,  Up: X Resources
  954.  
  955. Resource List
  956. -------------
  957.  
  958.    Emacs frames accept the following resources:
  959.  
  960. `geometry' (class `Geometry'): string
  961.      Initial geometry for the frame.  *Note Geometry Resources:: for a
  962.      complete discussion of how this works.
  963.  
  964. `iconic' (class `Iconic'): boolean
  965.      Whether this frame should appear in the iconified state.
  966.  
  967. `internalBorderWidth' (class `InternalBorderWidth'): int
  968.      How many blank pixels to leave between the text and the edge of the
  969.      window.
  970.  
  971. `interline' (class `Interline'): int
  972.      How many pixels to leave between each line (may not be
  973.      implemented).
  974.  
  975. `menubar' (class `Menubar'): boolean
  976.      Whether newly-created frames should initially have a menubar.  Set
  977.      to true by default.
  978.  
  979. `initiallyUnmapped' (class `InitiallyUnmapped'): boolean
  980.      Whether XEmacs should leave the initial frame unmapped when it
  981.      starts up.  This is useful if you are starting XEmacs as a server
  982.      (e.g. in conjunction with gnuserv or the external client widget).
  983.      You can also control this with the `-unmapped' command-line option.
  984.  
  985. `barCursor' (class `BarColor'): boolean
  986.      Whether the cursor should be displayed as a bar, or the
  987.      traditional box.
  988.  
  989. `cursorColor' (class `CursorColor'): color-name
  990.      The color of the text cursor.
  991.  
  992. `scrollBarWidth' (class `ScrollBarWidth'): integer
  993.      How wide the vertical scrollbars should be, in pixels; 0 means no
  994.      vertical scrollbars.  You can also use a resource specification of
  995.      the form `*scrollbar.width', or the usual toolkit scrollbar
  996.      resources: `*XmScrollBar.width' (Motif), `*XlwScrollBar.width'
  997.      (Lucid), or `*Scrollbar.thickness' (Athena).  We don't recommend
  998.      that you use the toolkit resources, though, because they're
  999.      dependent on how exactly your particular build of XEmacs was
  1000.      configured.
  1001.  
  1002. `scrollBarHeight' (class `ScrollBarHeight'): integer
  1003.      How high the horizontal scrollbars should be, in pixels; 0 means no
  1004.      horizontal scrollbars.  You can also use a resource specification
  1005.      of the form `*scrollbar.height', or the usual toolkit scrollbar
  1006.      resources: `*XmScrollBar.height' (Motif), `*XlwScrollBar.height'
  1007.      (Lucid), or `*Scrollbar.thickness' (Athena).  We don't recommend
  1008.      that you use the toolkit resources, though, because they're
  1009.      dependent on how exactly your particular build of XEmacs was
  1010.      configured.
  1011.  
  1012. `scrollBarPlacement' (class `ScrollBarPlacement'): string
  1013.      Where the horizontal and vertical scrollbars should be positioned.
  1014.      This should be one of the four strings `bottom-left',
  1015.      `bottom-right', `top-left', and `top-right'.  Default is
  1016.      `bottom-right' for the Motif and Lucid scrollbars and
  1017.      `bottom-left' for the Athena scrollbars.
  1018.  
  1019. `topToolBarHeight' (class `TopToolBarHeight'): integer
  1020. `bottomToolBarHeight' (class `BottomToolBarHeight'): integer
  1021. `leftToolBarWidth' (class `LeftToolBarWidth'): integer
  1022. `rightToolBarWidth' (class `RightToolBarWidth'): integer
  1023.      Height and width of the four possible toolbars.
  1024.  
  1025. `topToolBarShadowColor' (class `TopToolBarShadowColor'): color-name
  1026. `bottomToolBarShadowColor' (class `BottomToolBarShadowColor'): color-name
  1027.      Color of the top and bottom shadows for the toolbars.  NOTE: These
  1028.      resources do *not* have anything to do with the top and bottom
  1029.      toolbars (i.e. the toolbars at the top and bottom of the frame)!
  1030.      Rather, they affect the top and bottom shadows around the edges of
  1031.      all four kinds of toolbars.
  1032.  
  1033. `topToolBarShadowPixmap' (class `TopToolBarShadowPixmap'): pixmap-name
  1034. `bottomToolBarShadowPixmap' (class `BottomToolBarShadowPixmap'): pixmap-name
  1035.      Pixmap of the top and bottom shadows for the toolbars.  If set,
  1036.      these resources override the corresponding color resources. NOTE:
  1037.      These resources do *not* have anything to do with the top and
  1038.      bottom toolbars (i.e. the toolbars at the top and bottom of the
  1039.      frame)!  Rather, they affect the top and bottom shadows around the
  1040.      edges of all four kinds of toolbars.
  1041.  
  1042. `toolBarShadowThickness' (class `ToolBarShadowThickness'): integer
  1043.      Thickness of the shadows around the toolbars, in pixels.
  1044.  
  1045. `visualBell' (class `VisualBell'): boolean
  1046.      Whether XEmacs should flash the screen rather than making an
  1047.      audible beep.
  1048.  
  1049. `bellVolume' (class `BellVolume'): integer
  1050.      Volume of the audible beep.
  1051.  
  1052. `useBackingStore' (class `UseBackingStore'): boolean
  1053.      Whether XEmacs should set the backing-store attribute of the X
  1054.      windows it creates.  This increases the memory usage of the X
  1055.      server but decreases the amount of X traffic necessary to update
  1056.      the screen, and is useful when the connection to the X server goes
  1057.      over a low-bandwidth line such as a modem connection.
  1058.  
  1059.    Emacs devices accept the following resources:
  1060.  
  1061. `textPointer' (class `Cursor'): cursor-name
  1062.      The cursor to use when the mouse is over text.  This resource is
  1063.      used to initialize the variable `x-pointer-shape'.
  1064.  
  1065. `selectionPointer' (class `Cursor'): cursor-name
  1066.      The cursor to use when the mouse is over a selectable text region
  1067.      (an extent with the `highlight' property; for example, an Info
  1068.      cross-reference).  This resource is used to initialize the variable
  1069.      `x-selection-pointer-shape'.
  1070.  
  1071. `spacePointer' (class `Cursor'): cursor-name
  1072.      The cursor to use when the mouse is over a blank space in a buffer
  1073.      (that is, after the end of a line or after the end-of-file).  This
  1074.      resource is used to initialize the variable
  1075.      `x-nontext-pointer-shape'.
  1076.  
  1077. `modeLinePointer' (class `Cursor'): cursor-name
  1078.      The cursor to use when the mouse is over a mode line.  This
  1079.      resource is used to initialize the variable `x-mode-pointer-shape'.
  1080.  
  1081. `gcPointer' (class `Cursor'): cursor-name
  1082.      The cursor to display when a garbage-collection is in progress.
  1083.      This resource is used to initialize the variable
  1084.      `x-gc-pointer-shape'.
  1085.  
  1086. `scrollbarPointer' (class `Cursor'): cursor-name
  1087.      The cursor to use when the mouse is over the scrollbar.  This
  1088.      resource is used to initialize the variable
  1089.      `x-scrollbar-pointer-shape'.
  1090.  
  1091. `pointerColor' (class `Foreground'): color-name
  1092. `pointerBackground' (class `Background'): color-name
  1093.      The foreground and background colors of the mouse cursor.  These
  1094.      resources are used to initialize the variables
  1095.      `x-pointer-foreground-color' and `x-pointer-background-color'.
  1096.  
  1097. 
  1098. File: xemacs.info,  Node: Face Resources,  Next: Widgets,  Prev: Resource List,  Up: X Resources
  1099.  
  1100. Face Resources
  1101. --------------
  1102.  
  1103.    The attributes of faces are also per-frame. They can be specified as:
  1104.  
  1105.      Emacs*FACE_NAME.parameter: value
  1106.  
  1107. or
  1108.  
  1109.      Emacs*FRAME_NAME.FACE_NAME.parameter: value
  1110.  
  1111. Faces accept the following resources:
  1112.  
  1113. `attributeFont' (class `AttributeFont'): font-name
  1114.      The font of this face.
  1115.  
  1116. `attributeForeground' (class `AttributeForeground'): color-name
  1117. `attributeBackground' (class `AttributeBackground'): color-name
  1118.      The foreground and background colors of this face.
  1119.  
  1120. `attributeBackgroundPixmap' (class `AttributeBackgroundPixmap'): file-name
  1121.      The name of an XBM file (or XPM file, if your version of Emacs
  1122.      supports XPM), to use as a background stipple.
  1123.  
  1124. `attributeUnderline' (class `AttributeUnderline'): boolean
  1125.      Whether text in this face should be underlined.
  1126.  
  1127.    All text is displayed in some face, defaulting to the face named
  1128. `default'.  To set the font of normal text, use
  1129. `Emacs*default.attributeFont'. To set it in the frame named `fred', use
  1130. `Emacs*fred.default.attributeFont'.
  1131.  
  1132.    These are the names of the predefined faces:
  1133.  
  1134. `default'
  1135.      Everything inherits from this.
  1136.  
  1137. `bold'
  1138.      If this is not specified in the resource database, Emacs tries to
  1139.      find a bold version of the font of the default face.
  1140.  
  1141. `italic'
  1142.      If this is not specified in the resource database, Emacs tries to
  1143.      find an italic version of the font of the default face.
  1144.  
  1145. `bold-italic'
  1146.      If this is not specified in the resource database, Emacs tries to
  1147.      find a bold-italic version of the font of the default face.
  1148.  
  1149. `modeline'
  1150.      This is the face that the modeline is displayed in.  If not
  1151.      specified in the resource database, it is determined from the
  1152.      default face by reversing the foreground and background colors.
  1153.  
  1154. `highlight'
  1155.      This is the face that highlighted extents (for example, Info
  1156.      cross-references and possible completions, when the mouse passes
  1157.      over them) are displayed in.
  1158.  
  1159. `left-margin'
  1160. `right-margin'
  1161.      These are the faces that the left and right annotation margins are
  1162.      displayed in.
  1163.  
  1164. `primary-selection'
  1165.      This is the face that mouse selections are displayed in.
  1166.  
  1167. `isearch'
  1168.      This is the face that the matched text being searched for is
  1169.      displayed in.
  1170.  
  1171. `info-node'
  1172.      This is the face of info menu items.  If unspecified, it is copied
  1173.      from `bold-italic'.
  1174.  
  1175. `info-xref'
  1176.      This is the face of info cross-references.  If unspecified, it is
  1177.      copied from `bold'. (Note that, when the mouse passes over a
  1178.      cross-reference, the cross-reference's face is determined from a
  1179.      combination of the `info-xref' and `highlight' faces.)
  1180.  
  1181.    Other packages might define their own faces; to see a list of all
  1182. faces, use any of the interactive face-manipulation commands such as
  1183. `set-face-font' and type `?' when you are prompted for the name of a
  1184. face.
  1185.  
  1186.    If the `bold', `italic', and `bold-italic' faces are not specified
  1187. in the resource database, then XEmacs attempts to derive them from the
  1188. font of the default face.  It can only succeed at this if you have
  1189. specified the default font using the XLFD (X Logical Font Description)
  1190. format, which looks like
  1191.  
  1192.      *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
  1193.  
  1194. If you use any of the other, less strict font name formats, some of
  1195. which look like
  1196.  
  1197.      lucidasanstypewriter-12
  1198.      fixed
  1199.      9x13
  1200.  
  1201.    then XEmacs won't be able to guess the names of the bold and italic
  1202. versions.  All X fonts can be referred to via XLFD-style names, so you
  1203. should use those forms.  See the man pages for `X(1)', `xlsfonts(1)',
  1204. and `xfontsel(1)'.
  1205.  
  1206. 
  1207. File: xemacs.info,  Node: Widgets,  Next: Menubar Resources,  Prev: Face Resources,  Up: X Resources
  1208.  
  1209. Widgets
  1210. -------
  1211.  
  1212.    There are several structural widgets between the terminal EmacsFrame
  1213. widget and the top level ApplicationShell; the exact names and types of
  1214. these widgets change from release to release (for example, they changed
  1215. between 19.8 and 19.9, 19.9 and 19.10, and 19.10 and 19.12) and are
  1216. subject to further change in the future, so you should avoid mentioning
  1217. them in your resource database.  The above-mentioned syntaxes should be
  1218. forward- compatible.  As of 19.13, the exact widget hierarchy is as
  1219. follows:
  1220.  
  1221.      INVOCATION-NAME            "shell"       "container"     FRAME-NAME
  1222.      x-emacs-application-class  "EmacsShell"  "EmacsManager"  "EmacsFrame"
  1223.  
  1224.    where INVOCATION-NAME is the terminal component of the name of the
  1225. XEmacs executable (usually `xemacs'), and `x-emacs-application-class'
  1226. is generally `Emacs'.
  1227.  
  1228. 
  1229. File: xemacs.info,  Node: Menubar Resources,  Prev: Widgets,  Up: X Resources
  1230.  
  1231. Menubar Resources
  1232. -----------------
  1233.  
  1234.    As the menubar is implemented as a widget which is not a part of
  1235. XEacs proper, it does not use the fac" mechanism for specifying fonts
  1236. and colors: It uses whatever resources are appropriate to the type of
  1237. widget which is used to implement it.
  1238.  
  1239.    If Emacs was compiled to use only the Motif-lookalike menu widgets,
  1240. then one way to specify the font of the menubar would be
  1241.  
  1242.      Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
  1243.  
  1244.    If the Motif library is being used, then one would have to use
  1245.  
  1246.      Emacs*menubar*fontList: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
  1247.  
  1248.    because the Motif library uses the `fontList' resource name instead
  1249. of `font', which has subtly different semantics.
  1250.  
  1251.    The same is true of the scrollbars: They accept whichever resources
  1252. are appropriate for the toolkit in use.
  1253.  
  1254.